package com.ssy.lingxi.member.merchant.entity;

import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 会员入库资料变更历史记录
 * @author 万宁
 * @version 2.0.0
 * @date 2021-06-02
 */
@Entity
@Table(schema = "public", name = "ms_mc_member_deposit_detail_history", indexes = {@Index(name="ms_mc_member_deposit_detail_history_member_id_idx", columnList = "memberId"), @Index(name="ms_mc_member_deposit_detail_history_role_id_idx", columnList = "roleId"), @Index(name="ms_mc_member_deposit_detail_history_sub_member_id_idx", columnList = "subMemberId"), @Index(name="ms_mc_member_deposit_detail_history_sub_role_id_idx", columnList = "subRoleId")})
public class MemberDepositoryDetailHistoryDO implements Serializable {
    private static final long serialVersionUID = 6339085557301170711L;

    /**
     * 主键id
     */
    @Id
    @GeneratedValue(strategy= GenerationType.SEQUENCE, generator="member_deposit_detail_history_seq")
    @SequenceGenerator(sequenceName="ms_mc_member_deposit_detail_history_seq", name="member_deposit_detail_history_seq",allocationSize = 1)
    private Long id;

    /**
     *  变更时间
     */
    @Column(columnDefinition = "timestamp")
    private LocalDateTime createTime;

    /**
     * 上级会员Id
     */
    @Column
    private Long memberId;

    /**
     * 上级会员角色Id
     */
    @Column
    private Long roleId;

    /**
     * 下级会员Id
     */
    @Column
    private Long subMemberId;

    /**
     * 下级会员角色Id
     */
    @Column
    private Long subRoleId;

    /**
     * 字段中文名称
     */
    @Column
    private String fieldLocalName;

    /**
     * 修改之后的值
     */
    @Column
    private String fieldValue;

    /**
     * 修改之前的值
     */
    @Column
    private String lastValue;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public Long getMemberId() {
        return memberId;
    }

    public void setMemberId(Long memberId) {
        this.memberId = memberId;
    }

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    public Long getSubMemberId() {
        return subMemberId;
    }

    public void setSubMemberId(Long subMemberId) {
        this.subMemberId = subMemberId;
    }

    public Long getSubRoleId() {
        return subRoleId;
    }

    public void setSubRoleId(Long subRoleId) {
        this.subRoleId = subRoleId;
    }

    public String getFieldLocalName() {
        return fieldLocalName;
    }

    public void setFieldLocalName(String fieldLocalName) {
        this.fieldLocalName = fieldLocalName;
    }

    public String getFieldValue() {
        return fieldValue;
    }

    public void setFieldValue(String fieldValue) {
        this.fieldValue = fieldValue;
    }

    public String getLastValue() {
        return lastValue;
    }

    public void setLastValue(String lastValue) {
        this.lastValue = lastValue;
    }
}
